<template>
     <div class="home" @click='getcontacts'>
         <child ref="refName" @click.stop> </child>   
     </div>
 </template> 
 <script>
import child from "./ref_child"
     export default {
          components: {child},
          data(){
              return{
                  keywordValue:'',
                  id:'',
                  title:'',
              }
         },
          created(){
  
         },
          mounted(){
 
        
          },
          methods:{
             getcontacts() {
                 const childData = this.$refs.refName;
                 console.log(childData.title);//测试
　　　　　　　　　　　    childData.test();//测试方法
               
             },
         }
   }
  </script>

<style scoped lang="scss">
.home{
    width: 500px;
    height: 500px;
    background: red;
}
    
</style>